﻿CREATE TABLE [dbo].[codeCallOutcomeGroup] (
    [CallOutcomeGroupCode]       INT          IDENTITY (1, 1) NOT NULL,
    [CallTypeCode]               char(1)          NOT NULL,
    [ParentCallOutcomeGroupCode] INT          NULL,
    [Description]              VARCHAR (50) NOT NULL,
    [Active]                   BIT          NOT NULL,
	[OwnerID]	int null
);
GO
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Unique id', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'codeCallOutcomeGroup',
	@level2type = N'COLUMN', @level2name = N'CallOutcomeGroupCode';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Parent call outcome group id', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'codeCallOutcomeGroup',
	@level2type = N'COLUMN', @level2name = N'CallTypeCode';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Parent Call outcome group id', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'codeCallOutcomeGroup',
	@level2type = N'COLUMN', @level2name = N'ParentCallOutcomeGroupCode';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Description of the calloutcome group', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'codeCallOutcomeGroup',
	@level2type = N'COLUMN', @level2name = N'Description';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Set to 1 if the group is active', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'codeCallOutcomeGroup',
	@level2type = N'COLUMN', @level2name = N'Active';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'If set then this call outcome group is specific to an owner.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'codeCallOutcomeGroup',
	@level2type = N'COLUMN', @level2name = N'OwnerID';


